home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Libraries / Tools Plus 2.5.1 / Compiling the Demos < prev   
Encoding:
Text File  |  1994-12-04  |  4.0 KB  |  83 lines  |  [TEXT/ttxt]

  1. This document tells you how to compile the demo application that is included with this package.
  2.  
  3.  
  4.  
  5.  
  6. Compiling The C Demo Application
  7. ````````````````````````````````
  8. The easiest way to compile the C demo application included with Tools Plus is to have the following files in the same folder:
  9.     Demo.π
  10.     Demo.π.rsrc
  11.     Demo.c
  12.     ToolsPlus.Lib1
  13.     ToolsPlus.Lib2
  14.     ToolsPlus.Lib3
  15.     ToolsPlus.h
  16.     ToolsPlus.c
  17.     PascalStrHandles.c
  18. Double-click the Demo.π project file to launch THINK C, then run your project.
  19.  
  20.   Your project file keeps track of each file’s location as you add it to your project, so you may want to create a new project file after you have put all the Tools Plus libraries and their related files in their permanent folders.  Create a new (empty) project named “Demo.π” in the same folder as “Demo.π.rsrc” and “PascalStrHandles.c”.  Add the following files to your new project:
  21.     Segment 1:   MacTraps
  22.                  MacTraps2
  23.     Segment 2:   ANSI
  24.     Segment 3:   ToolsPlus.Lib1
  25.     Segment 4:   ToolsPlus.Lib2
  26.     Segment 5:   ToolsPlus.Lib3
  27.                  ToolsPlus.c
  28.     Segment 6:   Demo.c
  29. You can now build your project and run your application.
  30.  
  31.  
  32. Note: Make sure you allocate sufficient memory to the debugger if you
  33.       are going to run the Tools Plus demo application with the debugger
  34.       on.  The Tools Plus demo was written as one large source file,
  35.       making it easier to compile and study, but making it hungry for
  36.       debugger memory.  Allocate at least 500K to the debugger.  If you
  37.       don’t have enough memory, turn the debugger off (Project menu,
  38.       deselect “Use Debugger”) when running the demo.
  39.         Your applications will likely be written in a more intelligent
  40.       fashion, abandoning one large source file in favor of several
  41.       smaller ones.
  42.  
  43.  
  44. -----------------------------------------------------------------------
  45.  
  46.  
  47. Compiling The Pascal Demo Application
  48. `````````````````````````````````````
  49. The easiest way to compile the Pascal demo application included with Tools Plus is to have the following files in the same folder:
  50.     Demo.π
  51.     Demo.π.rsrc
  52.     Demo.p
  53.     ToolsPlus.Lib1
  54.     ToolsPlus.Lib2
  55.     ToolsPlus.Lib3
  56.     ToolsPlus.p
  57. Double-click the Demo.π project file to launch THINK Pascal, then run your project.
  58.  
  59.   Your project file keeps track of each file’s location as you add it to your project, so you may want to create a new project file after you have put all the Tools Plus libraries and their related files in their permanent folders.  Create a new project named “Demo.π” in the same folder as “Demo.π.rsrc”.  Add the following files to your new project:
  60.     Segment 1:   Runtime.Lib
  61.                  Interface.Lib
  62.     Segment 2:   ToolsPlus.Lib1
  63.     Segment 3:   ToolsPlus.Lib2
  64.     Segment 4:   ToolsPlus.Lib3
  65.                  ToolsPlus.p
  66.     Segment 5:   Sound.p
  67.                  Demo.p
  68. You can now build your project.  After the initial compile, you will notice THINK Pascal created some additional entries in your project file:
  69.     «ToolsPlus.Lib1:1»
  70.     «ToolsPlus.Lib2:1»
  71.     «ToolsPlus.Lib3:1»
  72.     «%_MethTables»
  73.     «%_SelProcs»
  74.     «%_Profiler»
  75.  
  76.   The «ToolsPlus.Lib1:1», «ToolsPlus.Lib2:1» and «ToolsPlus.Lib3:1» items contain the object code from the Tools Plus libraries, while «%_MethTables», «%_SelProcs» and «%_Profiler» items are part of THINK Pascal’s overhead (consult your THINK Pascal User Manual for details).
  77.  
  78.   Drag «ToolsPlus.Lib1:1» into the same segment as ToolsPlus.Lib1, «ToolsPlus.Lib2:1» into the same segment as ToolsPlus.Lib2, and «ToolsPlus.Lib3:1» into the same segment as ToolsPlus.Lib3.
  79.  
  80.   Drag «%_MethTables», «%_SelProcs» and «%_Profiler» to any segment that won’t be unloaded while your application is running, such as the one containing the Runtime.lib library.
  81.  
  82.   Even though the project window indicates that Segment 1 exceeds the 32k limit imposed on segments, the project will compile and run.  When you build your application, the smart linker will strip away unneeded code and significantly reduce the size of this segment.
  83.